<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:70:"D:\east_environmental\public/../application/index\view\user\index.html";i:1547561905;s:61:"D:\east_environmental\application\index\view\common\menu.html";i:1547561905;s:63:"D:\east_environmental\application\index\view\common\footer.html";i:1546865478;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <script src="/index/js/jquery-1.9.1.min.js"></script>
    <script src="/index/js/layer.js"></script>
    <!---->
    <link rel="stylesheet" href="/index/libs/swiper3/css/swiper.min.css">
    <link rel="stylesheet" href="/index/css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="/index/libs/layui/css/layui.css">
    <link rel="stylesheet" href="/index/css/common.css">
    <link rel="stylesheet" href="/index/css/user-center.css">


    <!---->
    <script src="/index/libs/swiper3/js/swiper.min.js"></script>
    <script src="/index/libs/layui/layui.js"></script>
    <script src="/index/js/jquery.ztree.core.js"></script>
    <script src="/index/js/jquery.ztree.excheck.js"></script>

    <script src="/index/js/common.js"></script>
    <!--<script src="./js/index.js"></script>-->
</head>
<body>
<div class="wrap">
    <header>
            <div class="nav wrap-w clearfix">
        <div class="fl nav-left">
            <a href="<?php echo url('index/index'); ?>" class="logo">
                <img src="/index/images/logo_04.png" alt="">
            </a>
            <a href="javascript:void(0)" class="city-select">
                <dl>
                    <dt>
                        <em class="city">全国</em><img src="/index/images/logo_06.png" alt="">
                    </dt>
                    <dd class="clearfix">
                        <p class="active"><span>全国</span></p>
                        <?php foreach($province as $k=>$v): ?>
                        <p><span><?php echo $v['province']; ?></span></p>
                        <?php endforeach; ?>
                    </dd>
                </dl>

            </a>
            <a href="<?php echo url('index/index'); ?>" <?php if((isset($active))): if(($active == 1)): ?>class="active" <?php endif; endif; ?>>首页</a>
            <a href="<?php echo url('index/news_list',['type'=>1]); ?>" <?php if((isset($active))): if(($active == 3)): ?>class="active" <?php endif; endif; ?>>新闻中心</a>
            <a href="<?php echo url('index/activity'); ?>" <?php if((isset($active))): if(($active == 4)): ?>class="active" <?php endif; endif; ?>>促销活动</a>
            <a href="<?php echo url('index/public_info'); ?>" <?php if((isset($active))): if(($active == 2)): ?>class="active" <?php endif; endif; ?>>信息公开</a>
        </div>
        <div class="fr nav-right clearfix">
            <dl class="user">
                <dt>欢迎您！
                    <?php if((isset($user))): if((isset($user['realname']) && !empty($user['realname']))): ?>
                              <?php echo $user['user_name']; else: ?>
                    &nbsp;&nbsp;        <?php echo $user['user_name']; endif; else: ?>
                    <a href="<?php echo url('login/login'); ?>">登录</a>/<a href="<?php echo url('login/register'); ?>">注册</a>
                    <?php endif; ?>
                </dt>
                <?php if((isset($user))): ?>
                <div class="dd">
                    <dd>
                        <a href="<?php echo url('user/index',['type'=>2]); ?>"><img class="img-origin" src="/index/list0.png" alt=""><img class="img-active" src="/index/list1.png" alt="">我的订单</a>
                    </dd>
                    <!--<dd>-->
                        <!--<a href=""><img class="img-origin" src="/index/msg0.png" alt=""><img class="img-active" src="/index/msg1.png" alt="">我的邮件</a>-->
                    <!--</dd>-->
                    <dd>
                        <a href="<?php echo url('user/index'); ?>"><img class="img-origin" src="/index/set0.png" alt=""><img class="img-active" src="/index/set1.png" alt="">个人中心</a>
                    </dd>
                    <dd>
                        <a href="<?php echo url('login/login_out'); ?>"><img class="img-origin" src="/index/out1.png" alt=""><img class="img-active" src="/index/out0.png" alt="">退出登录</a>
                    </dd>
                </div>
                <?php endif; ?>
            </dl>
            <dl class="messages">
                <a href="<?php echo url('user/index',['type'=>3]); ?>"> <dt><img src="/index/images/img_06.png" alt=""></dt></a>
                <!--<div class="dd">-->
                    <!--<?php foreach($notice as $k=>$v): ?>-->

                    <!--<dd>-->
                        <!--<a href="">-->
                                <!--<?php if(($v['type'] == 1 )): ?>-->
                                <!--<span class="blue">【通知】</span>-->
                                <!--<?php endif; ?>-->
                                 <!--<?php if(($v['type'] == 2 )): ?>-->
                                <!--<span class="green">【公告】</span>-->
                                <!--<?php endif; ?>-->
                                 <!--<?php echo $v['system_title']; ?>-->
                                <!--<?php if(($k < 3)): ?>-->
                                 <!--<span class="dots"></span>-->
                                <!--<?php endif; ?>-->
                        <!--</a>-->
                    <!--</dd>-->
                    <!--<?php endforeach; ?>-->
                    <!--<dd class="more">-->
                        <!--<a href="">查看更多 ></a>-->
                    <!--</dd>-->
                <!--</div>-->

            </dl>
            <dl class="notice">
                <dt><img src="/index/images/img_72_06_03.png" alt=""><span>关注我们</span></dt>
                <div class="dd clearfix">
                    <h1>扫一扫关注我们</h1>
                    <dd class="fl">
                        <img src="/index/images/img_61.png" alt="">
                        <p>微信公众号“9999”</p>

                    </dd>
                    <dd class="fr">
                        <img src="/index/images/img_05.jpg" alt="">
                        <p>新浪微博“东方环保”</p>
                    </dd>

                </div>


            </dl>
        </div>
    </div>



    </header>
    <div class="container container-register">
        <div class="wrap-w">
            <div class="register-header clearfix">
                <div class="fl">
                    <img src="/index/images/register_03.png" alt="">个人中心
                </div>

            </div>
            <div class="user-center-content clearfix">
                <div class="user-center-left fl">
                    <dl>
                        <dt <?php if(($type == 1)): ?>class="active"<?php endif; ?>><img src="/index/images/img1.png" alt="" class="img img1"><img src="/index/images/img1_active.png" alt="" class="img img2">信息设置</dt>

                    </dl>
                    <dl>
                        <dt <?php if(($type == 2)): ?>class="active"<?php endif; ?>><img src="/index/images/img2.png" alt="" class="img img1"><img src="/index/images/img2.png" class="img img2">订单查询
                    </dl>
                    <dl>
                        <dt <?php if(($type == 3)): ?>class="active"<?php endif; ?>><img src="/index/images/img3.png" alt="" class="img img1"><img src="/index/images/img3_active.png" alt="" class="img img2">消息查看</dt>


                    </dl>
                    <dl>
                        <dt <?php if(($type == 4)): ?>class="active"<?php endif; ?>>
                      <img src="/index/images/img4.png" alt="" class="img img1"><img src="/index/images/img4_active.png" alt="" class="img img2">厂商认证</dt>
                        <!--<div class="dd">-->
                            <!--<dd class="current"><a href="javascript:void(0);">应急预案</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">清洁生产</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">固废处理</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">环评</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">固废运输</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">气处理</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">水处理</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">土壤</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">环保设备</a></dd>-->
                            <!--<dd><a href="javascript:void(0);">委托检测</a></dd>-->
                        <!--</div>-->

                    </dl>
                    <dl>
                        <dt <?php if(($type == 5)): ?>class="active"<?php endif; ?>><img src="/index/images/img5.png" alt="" class="img img1"><img src="/index/images/img5_active.png" alt="" class="img img2">资质证明</dt>


                    </dl>
                    <dl>
                        <dt <?php if(($type == 6)): ?>class="active"<?php endif; ?>><img src="/index/images/img6.png" alt="" class="img img1"><img src="/index/images/img6_active.png" alt="" class="img img2">发布订单</dt>
                        <div class="dd">
                            <dd class="current"><a href="javascript:void(0);">应急预案</a></dd>
                            <dd><a href="javascript:void(0);">清洁生产</a></dd>
                            <dd><a href="javascript:void(0);">固废处理</a></dd>
                            <dd><a href="javascript:void(0);">环评</a></dd>
                            <dd><a href="javascript:void(0);">固废运输</a></dd>
                            <dd><a href="javascript:void(0);">气处理</a></dd>
                            <dd><a href="javascript:void(0);">水处理</a></dd>
                            <dd><a href="javascript:void(0);">土壤</a></dd>
                            <dd><a href="javascript:void(0);">环保设备</a></dd>
                            <dd><a href="javascript:void(0);">委托检测</a></dd>
                        </div>

                    </dl>
                </div>
                <div class="user-center-right fr">
                    <div class="box-list">
                        <div class="box-show">
                            <div class="box  info-box <?php if(($type == 1)): ?>show<?php else: ?>hide<?php endif; ?>">
                            <!--<div class="box  info-box hide">-->

                                    <!--<div class="user-img fl" style="background-image: url(/index/images/user_icon2.png)"></div>-->
                                    <img class="user-img fl" src="<?php echo (isset($user['img']) && ($user['img'] !== '')?$user['img']:'/index/images/user_icon2.png'); ?>" alt="" id="head_img">

                                <button type="button" class="upload" id="upload1">
                                    <span >更换厂商图片</span>
                                </button>

                                <div class="item">
                                    <div class="input clearfix">
                                        <label for="" class="fl"><i style="color: red">*</i>姓名</label>
                                        <input type="text" class="name input-border fl" value="<?php echo $user['realname']; ?>" id="realname">
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="input clearfix">
                                        <label for="" class="fl"><i style="color: red">*</i>电子邮件</label>
                                        <div class="input-box">
                                            <input type="text" class="name input-border  fl" readonly="readonly" value="<?php echo (isset($user['email'] ) && ($user['email']  !== '')?$user['email'] :''); ?>" id="email">
                                            <?php if((!empty($user['email']))): ?>
                                            <span class="btn-change remove_readonly">修改邮箱</span>
                                            <?php else: ?>
                                            <span class="btn-change remove_readonly" >点击绑定</span>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="item">
                                    <div class="input clearfix">
                                        <label for="" class="fl"><i style="color: red">*</i>手机号</label>
                                        <div class="input-box">
                                            <input type="text" class="name input-border  fl" readonly value="<?php echo $user['mobile']; ?>" id="mobile">
                                            <span class="btn-change remove_readonly_1">修改手机</span>
                                        </div>
                                        <!--<span class="btn-change hide">绑定手机</span>-->
                                    </div>
                                </div>
                                <button class="save" id="save_userinfo">保存</button>
                            </div>
                        </div>
                        <!----用户个人信息--->

                        <script>

                            layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                var form = layui.form
                                    , layer = layui.layer
                                    , layedit = layui.layedit
                                    , upload = layui.upload
                                    , laydate = layui.laydate;

                                upload.render({
                                    elem: '#upload1'
                                    ,url: '/index/user/user_upload'
                                    ,accept: 'images' //普通文件
                                    ,done: function(res){
                                        if(res.code == 200){
                                            layer.msg(res.msg);
                                            $('#head_img').attr('src',res.data.url);
                                        }else{
                                            layer.msg(res.msg);
                                        }
                                    }
                                });

                                // 取消readonly
                                $('.remove_readonly').click(function () {
                                    $('#email').removeAttr('readonly');
                                });
                                $('.remove_readonly_1').click(function () {
                                    $('#mobile').removeAttr('readonly');
                                });
                                 //保存用户信息
                                $('#save_userinfo').click(function () {
                                    var myregPhone = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;  //手机正则式
                                    var myregEmail = /^[a-z0-9._%-]+@([a-z0-9-]+\.)+[a-z]{2,4}$|^1[3|4|5|7|8]\d{9}$/;  // 邮箱正则式
                                    var realname = $('#realname').val();
                                    var email = $('#email').val();
                                    var mobile = $('#mobile').val();
                                    if(realname.length <=0){
                                        layer.msg('用户名不能为空', {
                                            time: 2000, //20s后自动关闭
                                        });
                                        return false;
                                    }
                                    if(email.length > 0){
                                        if(!myregEmail.test(email)) {
                                            layer.msg('邮箱格式不正确', {
                                                time: 2000, //20s后自动关闭
                                            });
                                            return false;
                                        }
                                    }
                                    if(mobile.length <=0){
                                        layer.msg('手机号不能为空', {
                                            time: 2000, //20s后自动关闭
                                        });
                                        return false;
                                    }else if(!myregPhone.test(mobile)) {
                                        layer.msg('手机号不正确', {
                                            time: 2000, //20s后自动关闭
                                        });
                                        return false;
                                    }
                                    var head_img = $('#head_img').attr('src');
                                    // ajax
                                    $.ajax({
                                        type:'post',
                                        url:'/index/user/change_user_info',
                                        dataType:'json',
                                        data:{
                                            'realname':realname,
                                            'email':email,
                                            'mobile':mobile,
                                            'head_img':head_img,
                                        },
                                        success:function (data) {
                                            if(data.code == 200){
                                                layer.msg(data.msg);
                                            }else{
                                                layer.msg(data.msg);
                                            }
                                        }
                                    });



                                });
                            });
                        </script>

                        <!---个人信息结束--->

                        <div class="box-show">
                            <div class="box order-check <?php if(($type == 2)): ?>show<?php else: ?>hide<?php endif; ?>">
                            <!--<div class="box order-check show">-->
                                <form class="layui-form" action="">
                                    <div class="title">
                                        订单查询
                                    </div>
                                    <div class="item clearfix">
                                        <div class="input clearfix fl search-box">
                                            <input type="text" placeholder="请输入订单号或商家名称" class="name " value="" id="title">
                                            <span class="search-btn">订单搜索</span>
                                        </div>

                                    </div>
                                    <div class="item input-in clearfix">
                                        <!--<div class="layui-form-item fl mr-50">-->
                                        <div class="input fl     clearfix">
                                            <label for="" class="fl">选择下单时间</label>
                                            <div class="layui-inline">
                                                <div class="layui-input-inline">
                                                    <input type="text" name="date" id="date-order-check" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>
                                        </div>
                                        <!--</div>-->
                                        <!--<div class="layui-form-item fl">-->
                                        <div class="input clearfix fl">
                                            <label for="" class="fl">选择订单状态</label>
                                            <div class="layui-input-inline">
                                                <select name="orderState" lay-filter="orderState" id="orderState">
                                                    <!--<option value="">订单状态</option>-->
                                                    <option value="1" selected="">下单</option>
                                                    <option value="2">已下单</option>
                                                    <option value="3">已完成</option>
                                                </select>
                                            </div>
                                        </div>
                                        <!--</div>-->
                                    </div>
                                    <div class="item clearfix">
                                        <table>
                                            <thead>
                                            <tr>
                                                <th>分类名</th>
                                                <th>数量</th>
                                                <th>操作</th>
                                                <th>交易状态</th>
                                                <th>交易操作</th>
                                            </tr>
                                            </thead>
                                            <tbody class="tb-border" id="order-content">
                                            <!--<tr>-->
                                                <!--<td class="td" colspan="5">-->
                                                    <!--<div class="order-title">-->
                                                        <!--<span class="order-time">2018-10-10 订单号:20181008000020</span>-->
                                                        <!--<span class="order-person-receive order-blue">厦门环境技术研究院</span>-->
                                                    <!--</div>-->
                                                    <!--<div class="order-content">-->
                                                        <!--<table>-->
                                                            <!--<tbody>-->
                                                            <!--<tr>-->
                                                                <!--<td>-->
                                                                    <!--<h1 class="tit">固废处理</h1>-->
                                                                    <!--<p>固废编号</p>-->
                                                                    <!--<p>HJ09901 医疗废物-821-01-01</p>-->
                                                                <!--</td>-->
                                                                <!--<td>-->
                                                                    <!--<h1>25吨</h1>-->
                                                                <!--</td>-->
                                                                <!--<td>-->
                                                                    <!--<p>售后</p>-->
                                                                <!--</td>-->
                                                                <!--<td>-->
                                                                    <!--<a href="" class="order-blue">-->
                                                                        <!--下单-->
                                                                    <!--</a>-->
                                                                <!--</td>-->
                                                                <!--<td>-->
                                                            <!--<span class="order-operation">-->
                                                                <!--等待处理 1天6小时-->
                                                            <!--</span>-->
                                                                <!--</td>-->
                                                            <!--</tr>-->


                                                            <!--</tbody>-->
                                                        <!--</table>-->

                                                    <!--</div>-->
                                                <!--</td>-->
                                            <!--</tr>-->

                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="pagnation" id="pagnation-order-check">

                                    </div>
                                </form>

                            </div>
                        </div>
                        <div class="box-show">
                            <div class="box message-see <?php if(($type == 3)): ?>show<?php else: ?>hide<?php endif; ?>">
                                <div class="title clearfix">
                                   <div class="fl dots-box"> 消息查看</div>
                                    <div class="fr dots-box all-label" id="remove_em">
                                        <!--<em class='dot'></em> -->
                                        全部标记已读</div>
                                    <!--已读-->
                                    <script>
                                        $(document).on('click','#remove_em',function(){

                                            $.ajax({
                                                type:'post',
                                                url:'/index/user/del_msg',
                                                data:{
                                                    type:3,

                                                },
                                                dataType:'json',
                                                success:function (data) {
                                                    if(data.code == 200){
                                                        // 去掉所有红点
                                                        // th.parents('.item').remove();
                                                        $('.dot').hide();
                                                        $(this).parents('.box').find('.dot').remove();
                                                        layer.msg(data.msg);
                                                    }else{
                                                        layer.msg(data.msg);
                                                    }
                                                }
                                            });
                                        });
                                    </script>
                                    <!--已读结束-->
                                </div>

                                <div id="message-content">
                                    <!-- <div class="item">
                                        <div class="des fl">
                                            <p class="message-title clearfix">
                                              <span class="fl messages-title dots-box">
                                                 <em class="dot"></em>
                                                  消息查看</span>
                                                <span class="fr">12.28 00:00<img src="/index/images/drop_down.png" alt=""></span>
                                            </p>
                                            <a href="">
                                                <p class="message">测试数据</p>
                                            </a>
                                        </div>
                                        <div class="delete-box">
                                            <p class="delete delete_msg" data="2">
                                                <img src="/index/images/delete.png" alt=""> 删除会话
                                            </p>
                                            <p class="label already_read" data="2">
                                                <img src="/index/images/delete.png" alt=""> 标记已读
                                            </p>
                                        </div>
                                    </div> -->
                                </div>

                                <!--<div class="pagnation">-->
                                <!--<span class="current">1</span>-->
                                <!--<span>2</span>-->
                                <!--<span>3</span>-->
                                <!--<span>4</span>-->
                                <!--<span>5</span>-->
                                <!--<span>...</span>-->
                                <!--<span>></span>-->
                                <!--<em>共100页，到第 <input type="text" value="12"> 页</em>-->
                                <!--<span class="sure">确定</span>-->


                                <!--</div>-->
                                <div class="pagnation" id="pagnation-message">

                                </div>

                            </div>
                        </div>
                        <div class="box-show">
                            <div class="box verify-box hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        厂商认证
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>认证方式</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="cate_id" id="cate_id">
                                                        <option value="" selected="">请选择认证方式</option>
                                                        <?php foreach($cate as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['cate_name']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>身份证号码</label>
                                            <input type="text" name="idcard" class="name input-border fl" placeholder="请输入身份证号码">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>身份证正面照</label>
                                            <div class="input-box fl clearfix">
                                                <div class="id-card fl" ><img src="/index/images/card-bg_03.png" id="upload_2" style="width: 186px;height: 122px"></div>
                                                <div class="upload fl">
                                                    <input type="hidden" id="id_img" value="">
                                                    <span id="upload2">上传身份证正面照</span>
                                                    <em><i>*</i>图片大小控制在1M以内</em>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>厂商名称</label>
                                            <input type="text" name="company_name" id="company_name" class="name input-border fl" placeholder="请输入厂商名称">
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>经营许可证</label>
                                            <div class="input-box fl clearfix">
                                                <div class="qu-card fl" ><img src="/index/images/qu.png" id="upload_3" style="width: 186px;height: 122px"></div>
                                                <div class="upload fl" >
                                                    <input type="hidden" id="business_license_img" value="">
                                                    <span id="upload3">上传经营许可证</span>
                                                    <em><i>*</i>图片大小控制在1M以内</em>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 上传身份证
                                            upload.render({
                                                elem: '#upload2'
                                                ,url: '/index/user/user_upload'
                                                ,accept: 'images' //普通文件
                                                ,done: function(res){
                                                    if(res.code == 200){
                                                        $('#id_img').val(res.data.url);
                                                        $('#upload_2').attr('src',res.data.url);
                                                        layer.msg(res.msg);
                                                    }else{
                                                        layer.msg(res.msg);
                                                    }
                                                }
                                            });

                                            // 上传许可证
                                            upload.render({
                                                elem: '#upload3'
                                                ,url: '/index/user/user_upload'
                                                ,accept: 'images' //普通文件
                                                ,done: function(res){
                                                    if(res.code == 200){
                                                        $('#business_license_img').val(res.data.url);
                                                        $('#upload_3').attr('src',res.data.url);
                                                        layer.msg(res.msg);
                                                    }else{
                                                        layer.msg(res.msg);
                                                    }
                                                }
                                            });
                                        });
                                    </script>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id" lay-filter="province_id">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id" lay-filter="city_id">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id" lay-filter="area_id">
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>详细地址</label>
                                            <input type="text" name="address" class="name input-border fl" placeholder="请输入详细地址" >
                                        </div>
                                    </div>
                                    <button class="save" id="save_auth">保存</button>
                                </div>
                            </div>

                            <!--厂商认证信息保存-->
                            <script>
                                layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                    var form = layui.form
                                        , layer = layui.layer
                                        , layedit = layui.layedit
                                        , upload = layui.upload
                                        , laydate = layui.laydate;
                                //    省市区联动
                                    form.on('select(province_id)', function(data){
                                        var value = data.value;
                                        $.ajax({
                                            type:'get',
                                            url:'/index/user/city?province_id='+value,
                                            dataType:'json',
                                            success:function (data) {
                                                if(data.code == 200){
                                                    var html = '';
                                                    $.each(data.data,function (i,v) {
                                                        html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                    });
                                                    $('#city_id').html(html);
                                                    form.render('select');
                                                }
                                            }
                                        });

                                    });
                                    form.on('select(city_id)', function(data){
                                        var value=$('select[name="city_id"] option:checked').val();
                                        $.ajax({
                                            type:'get',
                                            url:'/index/user/town?city_id='+value,
                                            dataType:'json',
                                            success:function (data) {
                                                console.log(data);
                                                console.log(222);
                                                if(data.code == 200){
                                                    console.log(data.data);
                                                    var html = '';
                                                    $.each(data.data,function (i,v) {
                                                        console.log(i);
                                                        console.log(v);
                                                        html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                    });
                                                    $('#area_id').html(html);
                                                    form.render('select');
                                                }
                                            }
                                        });
                                    });
                                //   省市区联动结束

                                    $('#save_auth').click(function () {
                                        var idcard = $('input[name="idcard"]').val();
                                        var id_img = $('#id_img').val();
                                        var company_name = $('#company_name').val();
                                        var business_license_img = $('#business_license_img').val();
                                        var cate_id = $('#cate_id').val();
                                        var province_id = $('#province_id').val();
                                        var city_id = $('#city_id').val();
                                        var area_id = $('#area_id').val();
                                        var address = $('input[name="address"]').val();
                                        if(idcard.length != 18){
                                            layer.msg('请输入正确身份证号');
                                            return;
                                        }
                                        if(id_img.length == 0){
                                            layer.msg('请上传身份证正面照');
                                            return;
                                        }
                                        if(company_name.length == 0){
                                            layer.msg('请输入厂商名称');
                                            return;
                                        }
                                        if(business_license_img.length == 0){
                                            layer.msg('请上传经营许可证');
                                            return;
                                        }
                                        if(cate_id.length == 0){
                                            layer.msg('请选择认证方式');
                                            return;
                                        }
                                        if(province_id.length == 0){
                                            layer.msg('请选择省份');
                                            return;
                                        }
                                        if(city_id.length == 0){
                                            layer.msg('请选择城市');
                                            return;
                                        }
                                        if(area_id.length == 0){
                                            layer.msg('请选择区域');
                                            return;
                                        }
                                        if(address.length == 0){
                                            layer.msg('请输入详细地址');
                                            return;
                                        }

                                        $.ajax({
                                            type:'post',
                                            url:'/index/user/check_auth_company',
                                            dataType:'json',
                                            data:{
                                                'idcard':idcard,
                                                'id_img':id_img,
                                                'company_name':company_name,
                                                'business_license_img':business_license_img,
                                                'cate_id':cate_id,
                                                'province_id':province_id,
                                                'city_id':city_id,
                                                'area_id':area_id,
                                                'address':address,
                                            },
                                            success:function (data) {
                                                if(data.code == 200){
                                                    // 清除内容
                                                    var idcard = $('input[name="idcard"]').val('');
                                                    var id_img = $('#id_img').val('');
                                                     $('#upload_2').attr('src','');
                                                     $('#upload_3').attr('src','');
                                                    var company_name = $('#company_name').val('');
                                                    var business_license_img = $('#business_license_img').val('');
                                                    var address = $('input[name="address"]').val('');
                                                    layer.msg(data.msg);
                                                }else{
                                                    layer.msg(data.msg);
                                                }
                                            }
                                        });
                                    });
                                });
                            </script>
                            <!--厂商认证结束-->

                        </div>
                        <div class="box-show">
                            <div class="box show qu-box <?php if(($type == 5)): ?>show<?php else: ?>hide<?php endif; ?>">
                            <!--<div class="box show qu-box show">-->

                            <div class="layui-form" action="">
                                    <div class="title">
                                        资质证明
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>认证方式</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="cate_name" id="cate_name">
                                                        <?php foreach($cate as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['cate_name']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">经营许可证</label>
                                            <div class="input-box fl clearfix">
                                                <div class="qu-card fl" >
                                                    <img src="/index/images/qu.png" id="upload_4" style="width: 186px;height: 122px">
                                                    <input type="hidden" id="business_license_img_1" value="">
                                                </div>
                                                <button  type="button" class="upload" >
                                                    <span id="upload4">上传经营许可证</span>
                                                    <em><i>*</i>图片大小控制在1M以内</em>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;


                                            // 上传许可证
                                            upload.render({
                                                elem: '#upload4'
                                                ,url: '/index/user/user_upload'
                                                ,accept: 'images' //普通文件
                                                ,done: function(res){
                                                    if(res.code == 200){
                                                        $('#business_license_img_1').val(res.data.url);
                                                        $('#upload_4').attr('src',res.data.url);
                                                        layer.msg(res.msg);
                                                    }else{
                                                        layer.msg(res.msg);
                                                    }
                                                }
                                            });
                                            
                                            $('#save_check').click(function () {
                                                var arrA = localStorage.getItem('arrA');
                                                console.log(arrA);
                                                var cate_id = $('#cate_name').val();
                                                var license_code = $('#license_code').val();
                                                var effective_time = $('#effective_time').val();
                                                var business_license_img_1 = $('#business_license_img_1').val();
                                                if(cate_id.length == 0){
                                                    layer.msg('请选择认证方式');
                                                    return;
                                                }
                                                if(business_license_img_1.length == 0){
                                                    layer.msg('请上传经营许可证');
                                                    return;
                                                }
                                                if(license_code.length == 0){
                                                    layer.msg('请输入许可证编号');
                                                    return;
                                                }
                                                if(effective_time.length == 0){
                                                    layer.msg('请选择有效日期');
                                                    return;
                                                }
                                                if(arrA == null){
                                                    layer.msg('请选择固废编码');
                                                    return;
                                                }
                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/user_prove',
                                                    dataType:'json',
                                                    data:{
                                                        'cate_id':cate_id,
                                                        'cate_code':arrA,
                                                        'license_code':license_code,
                                                        'effective_time':effective_time,
                                                        'business_license_img':business_license_img_1,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            // 清除内容
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">许可证编号</label>
                                            <input type="text" class="name input-border fl" value="" id="license_code">
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="layui-form-item">
                                            <div class="input clearfix">
                                                <label for="" class="fl">有效日期</label>
                                                <div class="layui-inline">
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="effective_time" id="effective_time" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input  clearfix">
                                            <label for="" class="fl">固废编码</label>
                                            <div class="fl code-fl">
                                                <div class="clearfix">
                                                    <ul id="qu-box-tree-left" class="qu-box-tree-left ztree fl"></ul>
                                                    <ul id="qu-box-tree-right" class="qu-box-tree-right ztree fl">
                                                        <div class="qu-box-tree-content">
                                                            <table class="clearfix">
                                                                <thead>                                                            
                                                                <th>废物代码</th>
                                                                <th>危险废物</th>
                                                                <th>危险特性</th>
                                                                </thead>
                                                                <tbody>
                                                                <!--<tr>-->
                                                                    <!--<td>-->
                                                                        <!--831-001-01-->
                                                                    <!--</td>-->
                                                                    <!--<td>感染性废物</td>-->
                                                                    <!--<td > In</td>-->

                                                                <!--</tr>-->
                                                                </tbody>

                                                            </table>
                                                        </div>
                                                    </ul>
                                                </div>
                                            </div>
                                            <button class="save" id="save_check">提交</button>
                                        </div>

                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-show">
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        应急预案
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_1" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_1" lay-filter="province_id_1">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_1" lay-filter="city_id_1">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_1" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_1)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_1').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_1)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_1').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_1').click(function () {
                                                var project = $('#project_1').val();
                                                var cate_id = 1;
                                                var province_id = $('#province_id_1').val();
                                                var city_id = $('#city_id_1').val();
                                                var area_id = $('#area_id_1').val();
                                                var address = $('#address_1').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            // 清除内容
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_1" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_1">保存</button>
                                    </div>


                                </div>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        清洁生产
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_2" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_2" lay-filter="province_id_2">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_2" lay-filter="city_id_2">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_2" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_2)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_2').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_2)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_2').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_2').click(function () {
                                                var project = $('#project_2').val();
                                                var cate_id = 2;
                                                var province_id = $('#province_id_2').val();
                                                var city_id = $('#city_id_2').val();
                                                var area_id = $('#area_id_2').val();
                                                var address = $('#address_2').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_2" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_2">保存</button>
                                    </div>
                                </div>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        固废处理
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">固废编码</label>
                                            <!--<input type="text" placeholder="请输入固废编码" class="name input-border fl" value="">-->
                                            <div class="fl code-fl">
                                                <div class="clearfix">
                                                    <ul id="qu-box-tree-left-c" class="qu-box-tree-left ztree fl"></ul>
                                                    <ul id="qu-box-tree-right-c" class="qu-box-tree-right ztree fl">
                                                        <div class="qu-box-tree-content">
                                                            <table class="clearfix">
                                                                <thead>                                                            
                                                                <th>废物代码</th>
                                                                <th>危险废物</th>
                                                                <th>危险特性</th>
                                                                </thead>
                                                                <tbody>
                                                                </tbody>

                                                            </table>
                                                        </div>
                                                    </ul>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id_10" lay-filter="province_id_10" id="province_id_10">
                                                        <option value="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id_10" lay-filter="city_id_10" id="city_id_10">
                                                        <option value="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id_10" lay-filter="area_id_10" id="area_id_10">
                                                        <option value="">请选择县/区</option>
                                                    </select>
                                                </div>

                                            </div>

                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_10)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_10').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_10)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_10').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });

                                            $('#save_10').click(function () {
                                                var cate_id = 3;
                                                var province_id = $('#province_id_10').val();
                                                var city_id = $('#city_id_10').val();
                                                var area_id = $('#area_id_10').val();
                                                var address = $('#address_10').val();
                                                var arrB = localStorage.getItem('arrB');

                                                if(arrB == null){
                                                    layer.msg('请选择固废编码');
                                                    return;
                                                }

                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'cate_id':cate_id,
                                                        'cate_code':arrB,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>





                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" class="name input-border fl" id="address_10" value="">
                                        </div>
                                        <button class="save" id="save_10">保存</button>
                                    </div>
                                </div>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        环评
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_3" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_3" lay-filter="province_id_3">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_3" lay-filter="city_id_3">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_3" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_3)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_3').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_3)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_3').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_3').click(function () {
                                                var project = $('#project_3').val();
                                                var cate_id = 4;
                                                var province_id = $('#province_id_3').val();
                                                var city_id = $('#city_id_3').val();
                                                var area_id = $('#area_id_3').val();
                                                var address = $('#address_3').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_3" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_3">保存</button>
                                    </div>
                                </>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        固废运输
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">固废分类</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="solid_type" lay-filter="gf-fl" id="solid_type">
                                                        <option value="1" selected="">一般分类</option>
                                                        <option value="2">危险分类</option>
                                                    </select>
                                                </div>

                                            </div>

                                        </div>
                                    </div>
                                    <div class="item gf-fl-code hide">
                                        <div class="input clearfix">
                                            <label for="" class="fl">固废编码</label>
                                            <!--<input type="text" placeholder="请输入固废编码" class="name input-border fl" value="">-->
                                            <div class="fl code-fl">
                                                <div class="clearfix">
                                                    <ul id="qu-box-tree-left-f" class="qu-box-tree-left ztree fl"></ul>
                                                    <ul id="qu-box-tree-right-f" class="qu-box-tree-right ztree fl">
                                                        <div class="qu-box-tree-content">
                                                            <table class="clearfix">
                                                                <thead>                                                            
                                                                <th>废物代码</th>
                                                                <th>危险废物</th>
                                                                <th>危险特性</th>
                                                                </thead>
                                                                <tbody>
                                                                <!--<tr>-->
                                                                    <!--<td>-->
                                                                        <!--831-001-01-->
                                                                    <!--</td>-->
                                                                    <!--<td>感染性废物</td>-->
                                                                    <!--<td > In</td>-->

                                                                <!--</tr>-->
                                                                </tbody>

                                                            </table>
                                                        </div>
                                                    </ul>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                    <div class="input clearfix">
                                        <label for="" class="fl">固废状态</label>
                                        <div class="input-box fl clearfix">
                                            <div class="layui-input-inline">
                                                <select name="gf-zt" lay-filter="gf-zt" id="solid_status">
                                                    <option value="1" selected="">固体</option>
                                                    <option value="2">液体</option>
                                                    <option value="3">半固半液</option>
                                                    <option value="4">气体</option>
                                                </select>
                                            </div>

                                        </div>

                                    </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">固废单位</label>
                                            <input type="number" placeholder="" id="solid_num" class="name input-border fl pr-none" ><em class="dw">吨</em>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">始发地</label>
                                            <input type="text" placeholder="" id="send_address" class="name input-border fl" value="">
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">目的地</label>
                                            <input type="text" placeholder="" id="end_address" class="name input-border fl" value="">
                                        </div>
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id_9" lay-filter="province_id_9" id="province_id_9">
                                                        <option value="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id_9" lay-filter="city_id_9" id="city_id_9">
                                                        <option value="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id_9"  id="area_id_9">
                                                        <option value="">请选择县/区</option>
                                                    </select>
                                                </div>

                                            </div>

                                        </div>
                                    </div>

                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_9)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_9').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_9)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_9').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });


                                            $('#save_solid').click(function () {
                                                var solid_type = $('#solid_type').val();
                                                var solid_status = $('#solid_status').val();
                                                var send_address = $('#send_address').val();
                                                var end_address = $('#end_address').val();
                                                var solid_num = $('#solid_num').val();
                                                var province_id_9 = $('#province_id_9').val();
                                                var city_id_9 = $('#city_id_9').val();
                                                var area_id_9 = $('#area_id_9').val();
                                                var address = $('#address_9').val();
                                                var desc = $('#desc').val();
                                                console.log(desc);
                                                var cate_id = 5;
                                                var arrC = localStorage.getItem('arrC');


                                                if(solid_type == 2 && arrC == null){
                                                    // 获取废物编码
                                                        layer.msg('请选择固废编码');
                                                        return;
                                                }
                                                if(solid_num.length == 0){
                                                    layer.msg('请输入固废单位');
                                                    return;
                                                }
                                                if(send_address.length == 0){
                                                    layer.msg('请输入始发地');
                                                    return;
                                                }
                                                if(end_address.length == 0){
                                                    layer.msg('请输入目的地');
                                                    return;
                                                }
                                                if(province_id_9.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id_9.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id_9.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }
                                                if(desc.length == 0){
                                                    layer.msg('请输入固废描述');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'solid_type':solid_type,
                                                        'solid_status':solid_status,
                                                        'send_address':send_address,
                                                        'end_address':end_address,
                                                        'solid_num':solid_num,
                                                        'cate_id':cate_id,
                                                        'cate_code':arrC,
                                                        'province_id':province_id_9,
                                                        'city_id':city_id_9,
                                                        'area_id':area_id_9,
                                                        'address':address,
                                                        'desc':desc,
                                                    },
                                                    success:function (data) {
                                                        console.log(data);
                                                        if(data.code == 200){
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" class="name input-border fl" id="address_9" placeholder="请输入详细地址">
                                        </div>

                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">固废描述</label>
                                            <textarea name=""  cols="30" rows="10" class="name des input-border fl" id="desc"></textarea>
                                            <!--<input type="text" placeholder="" class="name input-border fl" value="">-->
                                        </div>
                                        <button class="save" id="save_solid">保存</button>
                                    </div>
                                </div>

                            </div>




                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        气处理
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_4" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_4" lay-filter="province_id_4">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_4" lay-filter="city_id_4">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_4" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_4)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_4').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_4)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_4').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_4').click(function () {
                                                var project = $('#project_4').val();
                                                var cate_id = 6;
                                                var province_id = $('#province_id_4').val();
                                                var city_id = $('#city_id_4').val();
                                                var area_id = $('#area_id_4').val();
                                                var address = $('#address_4').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_4" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_4">保存</button>
                                    </div>
                                </div>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        水处理
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_5" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_5" lay-filter="province_id_5">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_5" lay-filter="city_id_5">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_5" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_5)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_5').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_5)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_5').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_5').click(function () {
                                                var project = $('#project_5').val();
                                                var cate_id = 7;
                                                var province_id = $('#province_id_5').val();
                                                var city_id = $('#city_id_5').val();
                                                var area_id = $('#area_id_5').val();
                                                var address = $('#address_5').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            // 清除内容
                                                            // var project = $('#project_1').val();
                                                            // var cate_id = 1;
                                                            // var province_id = $('#province_id_1').val();
                                                            // var city_id = $('#city_id_1').val();
                                                            // var area_id = $('#area_id_1').val();
                                                            // var address = $('input[name="address"]').val();
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_5" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_5">保存</button>
                                    </div>
                                </div>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        土壤
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_6" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_6" lay-filter="province_id_6">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_6" lay-filter="city_id_6">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_6" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_6)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_6').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_6)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_6').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_6').click(function () {
                                                var project = $('#project_6').val();
                                                var cate_id = 8;
                                                var province_id = $('#province_id_6').val();
                                                var city_id = $('#city_id_6').val();
                                                var area_id = $('#area_id_6').val();
                                                var address = $('#address_6').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            // 清除内容
                                                            // var project = $('#project_1').val();
                                                            // var cate_id = 1;
                                                            // var province_id = $('#province_id_1').val();
                                                            // var city_id = $('#city_id_1').val();
                                                            // var area_id = $('#area_id_1').val();
                                                            // var address = $('input[name="address"]').val();
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_6" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_6">保存</button>
                                    </div>
                                </div>

                            </div>
                            <div class="box order-send hide">
                                <form class="layui-form" action="">
                                    <div class="title">
                                        环保设备
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_7" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_7" lay-filter="province_id_7">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_7" lay-filter="city_id_7">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_7" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_7)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_7').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_7)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_7').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_7').click(function () {
                                                var project = $('#project_7').val();
                                                var cate_id = 9;
                                                var province_id = $('#province_id_7').val();
                                                var city_id = $('#city_id_7').val();
                                                var area_id = $('#area_id_7').val();
                                                var address = $('#address_7').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            // 清除内容
                                                            // var project = $('#project_1').val();
                                                            // var cate_id = 1;
                                                            // var province_id = $('#province_id_1').val();
                                                            // var city_id = $('#city_id_1').val();
                                                            // var area_id = $('#area_id_1').val();
                                                            // var address = $('input[name="address"]').val();
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_7" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_7">保存</button>
                                    </div>
                                </form>

                            </div>
                            <div class="box order-send hide">
                                <div class="layui-form" action="">
                                    <div class="title">
                                        委托检测
                                    </div>
                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">项目名称</label>
                                            <input type="text" placeholder="请输入项目名称" id="project_8" class="name input-border fl" value="">
                                        </div>
                                    </div>

                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl"><i style="color: red">*</i>所在地</label>
                                            <div class="input-box fl clearfix">
                                                <div class="layui-input-inline">
                                                    <select name="province_id" id="province_id_8" lay-filter="province_id_8">
                                                        <option value="" selected="">请选择省</option>
                                                        <?php foreach($province as $k=>$v): ?>
                                                        <option value="<?php echo $v['id']; ?>" ><?php echo $v['province']; ?></option>
                                                        <?php endforeach; ?>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="city_id" id="city_id_8" lay-filter="city_id_8">
                                                        <option value="" selected="">请选择市</option>
                                                    </select>
                                                </div>
                                                <div class="layui-input-inline">
                                                    <select name="area_id" id="area_id_8" >
                                                        <option value="" selected="">请选择县/区</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        layui.use(['form', 'layedit', 'upload','laydate'], function() {
                                            var form = layui.form
                                                , layer = layui.layer
                                                , layedit = layui.layedit
                                                , upload = layui.upload
                                                , laydate = layui.laydate;
                                            // 省市区联动
                                            form.on('select(province_id_8)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/city?province_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.city+'</option>';
                                                            });
                                                            $('#city_id_8').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });

                                            });
                                            form.on('select(city_id_8)', function(data){
                                                var value = data.value;
                                                $.ajax({
                                                    type:'get',
                                                    url:'/index/user/town?city_id='+value,
                                                    dataType:'json',
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            var html = '';
                                                            $.each(data.data,function (i,v) {
                                                                html+='<option value="'+v.id+'" >'+v.area+'</option>';
                                                            });
                                                            $('#area_id_8').html(html);
                                                            form.render('select');
                                                        }
                                                    }
                                                });
                                            });
                                            // 省市区联动结束

                                            $('#save_order_8').click(function () {
                                                var project = $('#project_8').val();
                                                var cate_id = 10;
                                                var province_id = $('#province_id_8').val();
                                                var city_id = $('#city_id_8').val();
                                                var area_id = $('#area_id_8').val();
                                                var address = $('#address_8').val();

                                                if(project.length == 0){
                                                    layer.msg('请输入项目名称');
                                                    return;
                                                }
                                                if(province_id.length == 0){
                                                    layer.msg('请选择省份');
                                                    return;
                                                }
                                                if(city_id.length == 0){
                                                    layer.msg('请选择城市');
                                                    return;
                                                }
                                                if(area_id.length == 0){
                                                    layer.msg('请选择区域');
                                                    return;
                                                }
                                                if(address.length == 0){
                                                    layer.msg('请输入详细地址');
                                                    return;
                                                }

                                                $.ajax({
                                                    type:'post',
                                                    url:'/index/user/order_push',
                                                    dataType:'json',
                                                    data:{
                                                        'project_name':project,
                                                        'cate_id':cate_id,
                                                        'province_id':province_id,
                                                        'city_id':city_id,
                                                        'area_id':area_id,
                                                        'address':address,
                                                    },
                                                    success:function (data) {
                                                        if(data.code == 200){
                                                            layer.msg(data.msg);
                                                        }else{
                                                            layer.msg(data.msg);
                                                        }
                                                    }
                                                });
                                            });
                                        });
                                    </script>


                                    <div class="item">
                                        <div class="input clearfix">
                                            <label for="" class="fl">详细地址</label>
                                            <input type="text" id="address_8" class="name input-border fl" value=" " placeholder="请输入详细地址">
                                        </div>
                                        <button class="save" id="save_order_8">保存</button>
                                    </div>
                                </div>

                            </div>



                        </div>

                    </div>

                    </div>
                </div>
            </div>

        </div>
    </div>
    <footer>
    <div class="footer-menu">

        <div class="wrap-w clearfix">
            <dl>
                <dt>
                    我们的服务
                </dt>
                <dd><a href="">线下服务</a></dd>
                <dd><a href="">订单系统</a></dd>
            </dl>
            <dl>
                <dt>
                    关于我们
                </dt>
                <dd><a href="">公司介绍</a></dd>
                <dd><a href="">团队介绍</a></dd>
                <dd><a href="">联系方式</a></dd>
            </dl>
            <dl>
                <div class="erwei fl">
                    <img src="/index/images/img_61.png" alt="">
                    <p>官方微信</p>
                </div>
                <div class="fl">
                    <dt>
                        联系我们
                    </dt>
                    <dd class="footer-phone"><a href=""><img src="/index/images/phone_03.png" alt="">400-222-8888</a></dd>
                    <dd><a href="javascript:void(0);">地址：福建省晋江市安东开发区</a></dd>
                </div>
            </dl>
            <!--<dl>-->
            <!--<dt>-->
            <!--联系我们-->
            <!--</dt>-->
            <!--<dd><a href=""><img src="/index/images/phone_03.png" alt="">400-222-8888</a></dd>-->
            <!--<dd><a href="javascript:void(0);">地址：福建省晋江市安东开发区</a></dd>-->
            <!--</dl>-->
        </div>
    </div>
    <p class="foot">Copyright©2015-2018，版权所有 东方环保 </p>
</footer>
    </div>


<script src="/index/js/user-code-main.js"></script>
<script src="/index/js/user-change-main.js"></script>

<script>
    var orderEle = '';
    var messageEle = '';

    //layui模块
    layui.use(['form', 'layedit', 'laydate','laypage'], function() {
        var form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate
                , laypage = layui.laypage;

        //日期
        laydate.render({
            elem: '#effective_time'
        });
        laydate.render({
            elem: '#date-order-check'
        });
        form.render('select');


        form.on('select(gf-fl)', function(data){
            var value = data.value;
            if(value == "2"){
                $('.gf-fl-code').removeClass('hide');
            }else{
                $('.gf-fl-code').addClass('hide');
            }


        })
        form.on('select(szd10)', function(data){
            var value = data.value;


            form.render('select');
        });
        form.on('select(orderState)', function(data){
            var value = data.value;
            orderAjax($('#title').val(),value,5,1);

            form.render('select');
        });

        $('.search-btn').on('click',function(){
            orderAjax($('#title').val(),$('#orderState').val(),5,1);

        })



var messageCount = window.localStorage.getItem('messageCount');
        laypage.render({
            elem: 'pagnation-message'
            ,count:messageCount
//            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
            ,limit:5
            ,layout: [ 'prev','page','next','count', 'skip']
            ,prev: '<em><</em>'
                ,next: '<em>></em>'
            ,jump: function(obj){
                var pageSize = obj.limit;
                var pageNo = obj.curr;
                $('message-content').html('');
                messageAjax(pageSize,pageNo);
            }
        });

        var orderCount = window.localStorage.getItem('orderCount');
        laypage.render({
            elem: 'pagnation-order-check'
            ,count: orderCount
//            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
            ,limit:5
            ,layout: [ 'prev','page','next','count', 'skip']
            ,prev: '<em><</em>'
            ,next: '<em>></em>'
            ,jump: function(obj){
                var pageSize = obj.limit;
                var pageNo = obj.curr;
                $('#order-content').html('');
                orderAjax($('#title').val(),$('#orderState').val(),pageSize,pageNo);
            }
        });

    })


</script>

<script>
    $(function () {
        window.localStorage.clear();
        //订单和消息默认渲染第一页
        // messageAjax(10,1);
        // orderAjax(10,1);


        $('.user-center-left dt').on('click',function () {
            var _num = $(this).siblings('.dd').length;
            var _index = $(this).parent().index();
            $(this).addClass('active');
            $(this).parent().siblings().find('dt').removeClass('active');
            $(this).siblings('.dd').slideToggle();
            $(this).parents('dl').siblings().find('.dd').slideUp();
            if(_num <= 0){
                $('.box-list .box-show').eq(_index).find('.box').removeClass('hide').addClass('show');
                $('.box-list .box-show').eq(_index).siblings().find('.box').removeClass('show').addClass('hide');
            }else{

            }


        });
        $('.user-center-left .dd dd').on('click',function () {
            var _indexP = $(this).parents('dl').index();
            var _indexK = $(this).index();
            $(this).siblings().removeClass('current');
            $(this).parents('dl').siblings().find('dd').removeClass('current');
            $(this).addClass('current');
                $('.box-list .box-show').eq(_indexP).find('.box').eq(_indexK).removeClass('hide').addClass('show');
                $('.box-list .box-show').eq(_indexP).find('.box').eq(_indexK).siblings().removeClass('show').addClass('hide');
            $('.box-list .box-show').eq(_indexP).siblings().find('.box').removeClass('show').addClass('hide');



        });
//        $('select').on('change',function () {
//            var _text = $(this).find('option:checked').text();
//            $(this).siblings('span').text(_text)
//        })
        $(document).on('click','.message-title .fr',function () {
            $(this).parents('.item').find('.delete-box').slideToggle();
            $(this).parents('.item').siblings().find('.delete-box').slideUp();

        })


    /*消息删除*/

        $(document).on('click','.delete_msg',function(){
            var th = $(this);
            var id = $(this).attr('data');
            $.ajax({
                type:'post',
                url:'/index/user/del_msg',
                dataType:'json',
                data:{
                    'type':1,
                    'id':id
                },
                success:function (data) {
                    if(data.code == 200){
                        th.parents('.item').remove();
                        layer.msg(data.msg);
                    }else{
                        layer.msg(data.msg);
                    }
                }
            });
        });
/*单个标记已读*/
        $(document).on('click','.already_read',function(){
            var th = $(this);
            var id = $(this).attr('data');
            $.ajax({
                type:'post',
                url:'/index/user/del_msg',
                dataType:'json',
                data:{
                    'type':'1',
                    'id':id
                },
                success:function (data) {
                    if(data.code == 200){
                        // 取消红点
                        th.parents('.item').find('.dots-box .dot').remove();
                        th.parents('.item').find('.delete-box').slideToggle();
                        layer.msg(data.msg);
                    }else{
                        layer.msg(data.msg);
                    }
                }
            });
        });
    });
</script>
<script>

</script>
   